<?php
include('../../admin/php/bootstrap.php');
if (!$email = Doctrine::getTable('email')->findOneByValue($_POST['email'])) {
    $email = new Email();
    $email->value = $_POST['email'];
}
if (!$email->facebook) {
    $email->nombre = $_POST['name'];
    $email->facebook = $_POST['fb'];
    $email->save();
    echo('success');
}
?>
